package com.example.bankend.model;

import javax.persistence.*;
import java.sql.Timestamp;

@Entity
@Table(name = "cardinfo")
//@Data
//lombok
public class BankCard {
    @Id
    private String cardID;

    private String curID;

    private String username; //用户名 唯一确认
    private Integer savingID;
    @Column(name = "open_date")
    private Timestamp openDate;
    @Column(name = "open_money")
    private Double openMoney;
    private Double balance;
    private String pass;
    @Column(name ="is_report_loss")
    private String isReportLoss;  //是否
    private Integer customerID;

    // 无参构造方法
    public BankCard() {
    }

    // 全参构造方法
    public BankCard(String cardID, String username,String curID, Integer savingID, Timestamp  openDate, Double openMoney, Double balance, String pass, String IsReportLoss, Integer customerID) {
        this.cardID = cardID;
        this.curID = curID;
        this.username = username;

        this.savingID = savingID;
        this.openDate = openDate;
        this.openMoney = openMoney;
        this.balance = balance;
        this.pass = pass;
        this.isReportLoss = IsReportLoss;
        this.customerID = customerID;
    }

    // Getters
    public String getCardID() {
        return cardID;
    }

    public String getCurID() {
        return curID;
    }

    public Integer getSavingID() {
        return savingID;
    }

    public Timestamp getOpenDate() {
        return openDate;
    }

    public Double getOpenMoney() {
        return openMoney;
    }

    public Double getBalance() {
        return balance;
    }

    public String getPass() {
        return pass;
    }

    public String getIsReportLoss() {
        return isReportLoss;
    }

    public Integer getCustomerID() {
        return customerID;
    }

    // Setters
    public void setCardID(String cardID) {
        this.cardID = cardID;
    }

    public void setCurID(String curID) {
        this.curID = curID;
    }

    public void setSavingID(Integer savingID) {
        this.savingID = savingID;
    }


    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public void setOpenDate(Timestamp openDate) {
        this.openDate = openDate;
    }

    public void setOpenMoney(Double openMoney) {
        this.openMoney = openMoney;
    }

    public void setBalance(Double balance) {
        this.balance = balance;
    }

    public void setPass(String pass) {
        this.pass = pass;
    }

    public void setIsReportLoss(String IsReportLoss) {
        this.isReportLoss = IsReportLoss;
    }

    public void setCustomerID(Integer customerID) {
        this.customerID = customerID;
    }
}